Skip to content

Slash post data when receive a subscription update#1310

Merged
dkotter merged 2 commits into
developfrom
fix/unslashed-post-data
Aug 27, 2025
Merged

Slash post data when receive a subscription update#1310
dkotter merged 2 commits into
developfrom
fix/unslashed-post-data

Conversation

@chandrapatel

Copy link
Copy Markdown
Contributor

Description of the Change

Post data not slashed when receive a subscription update from remote site. So, some post content like [latex] shortcode from MathJax-LaTeX plugin contains slash \ which get removed when updating post.

Original Post

[latex]\delta Z(t)| \approx e^{\lambda t} |\delta (Z(0))|[/latex]

After remote post updated

[latex]delta Z(t)| approx e^{lambda t} |delta (Z(0))|[/latex]

How to test the Change

  • No need to install MathJax-LaTeX plugin on source and destination site.
  • Add [latex]\delta Z(t)| \approx e^{\lambda t} |\delta (Z(0))|[/latex] shortcode to post on source site.
  • Distribute post to external site.
  • [latex] shortcode will migrate correctly on external site because if post is not distributed previously then it distributes using WP Core REST-API and it slash post data.
  • Add tets content to post on original site but keep the shortcode same.
  • External site post will be updated and shortcode will be updated like [latex]delta Z(t)| approx e^{lambda t} |delta (Z(0))|[/latex] where \ removed so shortcode does not render correctly by MathJax-LaTeX plugin.

Changelog Entry

Fixed - Post data not slashed when receive a subscription update

Credits

Props @chandrapatel

Checklist:

@chandrapatel chandrapatel requested a review from a team as a code owner March 29, 2025 17:27
@chandrapatel chandrapatel requested review from peterwilsoncc and removed request for a team March 29, 2025 17:27
@github-actions github-actions Bot added this to the 2.2.0 milestone Mar 29, 2025
@github-actions github-actions Bot added the needs:code-review This requires code review. label Mar 29, 2025
@peterwilsoncc

Copy link
Copy Markdown
Collaborator

@chandrapatel I'm having trouble reproducing this, sorry.

I've tested with both the classic and block editors using an external site, are you pushing or pulling to distribute?

@chandrapatel

Copy link
Copy Markdown
Contributor Author

@peterwilsoncc I'm pushing to external site. Did you update the post on the original site after it was distributed for the first time? Because this issue happens when distributed post updated.

@dkotter dkotter modified the milestones: 2.2.0, 2.3.0 Aug 26, 2025

@peterwilsoncc peterwilsoncc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @chandrapatel, this slipped.

Yes, I'm able to reproduce wit the subscription updates and an external site. This looks good to me and tests well.

@dkotter dkotter merged commit 21fabb3 into develop Aug 27, 2025
18 checks passed
@dkotter dkotter deleted the fix/unslashed-post-data branch August 27, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants